<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" id="html">
    <head>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <base href="<?= base_url(1); ?>" />
        <link type="text/css" href="css/main.css?v=<?= $config['version'] ?>" rel="stylesheet" />
        <link rel="stylesheet" href="edit/themes/default/default.css" />
        <link rel="stylesheet" href="edit/plugins/code/prettify.css" />
        <script charset="utf-8" src="edit/kindeditor.js"></script>
        <script charset="utf-8" src="edit/lang/zh_CN.js"></script>
        <script charset="utf-8" src="edit/plugins/code/prettify.js"></script>
        <script type="text/javascript">

           <!-- KindEditor.ready(function(K) {
                var editor1 = K.create('textarea[id="content"]', {
                    //width : w,
                    cssPath: 'edit/plugins/code/prettify.css',
                    uploadJson: 'edit/php/upload_json.php',
                    fileManagerJson: 'edit/php/file_manager_json.php',
                    allowFileManager: true,
                    urlType: "domain",
                    afterCreate: function() {
                        var self = this;
                        K.ctrl(document, 13, function() {
                            self.sync();
                            K('form[name=rowForm]')[0].submit();
                        });
                        K.ctrl(self.edit.doc, 13, function() {
                            self.sync();
                            K('form[name=rowForm]')[0].submit();
                        });
                    }
                });
                prettyPrint();
            });-->
        </script>
        <script src="js/time.js?"></script>
    </head>
    <body>
        <?php include(VIEWPATH . 'common/main_header.php'); ?>
        <form action="" method="POST" id="rowForm" name="rowForm">
            <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tablegrid tableedit">
            	<tr><td><?= translate('BUSINESSDATA_RECORD_BEGINTIME') ?>:</td><td><input type='text' name='row[begintime]' id='begintime' class='datepicker'/></td></tr>
                <tr><td><?= translate('BUSINESSDATA_RECORD_DOWNTIME') ?>:</td><td><input type="text" name="row[downtime]" id="downtime" size="15" /></td></tr>
                <tr><td><?= translate('BUSINESSDATA_RECORD_DURATION') ?>:</td><td><input type="text" name="row[durationtime]" id="durationtime" size="15" /></td></tr>
                <tr><td><?= translate('BUSINESSDATA_RECORD_AREA') ?>:</td><td><input type="text" name="row[area]" id="area" size="10" /></td></tr>
                <tr><td><?= translate('BUSINESSDATA_RECORD_IFREACTION') ?>:</td><td><input type="text" name="row[ifreaction]" id="ifreaction" size="10" /></td></tr>
                <tr><td><?= translate('BUSINESSDATA_RECORD_ESTIMATETIME') ?>:</td><td><input type="text" name="row[estimatetime]" id="estimatetime" size="15" /></td></tr>
                    <tr><td><?= translate('BUSINESSDATA_RECORD_CONTENT') ?>:</td>
                    <td><textarea cols="70" rows="15" name="row[content]" id="content"></textarea></td></tr>        
                <tr><td></td><td>
                        <input type="submit" value="<?= translate('SUBMIT') ?>" id="submit"/>
                        <input type="reset" value="<?= translate('RESET') ?>" id="reset"/></td></tr>
            </table>
        </form>
        <script type="text/javascript">
            SG.init("core.form", function() {
                $.formValidator.initConfig({formid: "#rowForm", submitonce: true});
                //$("#type").formValidator({empty: false, onshow: '<?= translate('PLASE_SELECT') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
                //$("#tmpsequence").formValidator({empty: false, onshow: '<?= translate('C_ONLY_NUM') ?>'}).regexValidator({regexp: 'num', datatype: 'enum', onerror: '<?= translate('C_ONLY_NUM') ?>'});
                //$("#timesec").formValidator({empty: false, onshow: '<?= translate('C_ONLY_NUM') ?>'}).regexValidator({regexp: 'num', datatype: 'enum', onerror: '<?= translate('C_ONLY_NUM') ?>'});
                $("#begintime").formValidator({empty: false, onshow: '<?= translate('PLASE_WRITE') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
                $("#downtime").formValidator({empty: false, onshow: '<?= translate('PLASE_WRITE') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
                $("#durationtime").formValidator({empty: false, onshow: '<?= translate('PLASE_WRITE') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
                $("#area").formValidator({empty: false, onshow: '<?= translate('PLASE_WRITE') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
                $("#ifreaction").formValidator({empty: false, onshow: '<?= translate('PLASE_WRITE') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
                $("#estimatetime").formValidator({empty: false, onshow: '<?= translate('PLASE_WRITE') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
                $("#content").formValidator({empty: false, onshow: '<?= translate('PLASE_WRITE') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
            });
        </script>
    </body>
</html>
